FROM centos:7
MAINTAINER zzyy<gaoxiaolei_7758@126.com>
#设置系统编码
RUN yum install kde-l10n-Chinese -y
RUN yum install glibc-common -y
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
##RUN export LANG=zh_CN.UTF-8
##RUN echo "export LANG=zh_CN.UTF-8" >> /etc/locale.conf
##ENV LANG zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8
#
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# 把宿主机当前上下文的c.txt拷贝到容器/usr/local/路径下
COPY hosts /
COPY BoyBD-SB-0.1-SNAPSHOT.jar /
# AI模型
COPY *.ser /
#把java与tomcat添加到容器中
ADD jdk-8u211-linux-x64.tar.gz /usr/local/
#安装vim编辑器
RUN yum -y install vim
#设置工作访问时候的WORKDIR路径，登录落脚点
ENV MYPATH /usr/local/
WORKDIR $MYPATH
#配置java环境变量
ENV JAVA_HOME /usr/local/jdk1.8.0_211
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH $PATH:$JAVA_HOME/bin
#容器运行时监听的端口
EXPOSE 8888
#启动jar
CMD cat /hosts >> /etc/hosts && cat /etc/hosts && java -jar /BoyBD-SB-0.1-SNAPSHOT.jar